<?php
$id = isset($_GET['id'])?(int)$_GET['id']:0;
$lanmu = isset($_GET['lanmu'])?(int)$_GET['lanmu']:0;
$c_id = isset($_GET['c_id'])?(int)$_GET['c_id']:0;

$where_sql=" where 1=1 ";
if($lanmu){
	$where_sql.=" and lanmu={$lanmu}";
}
if(!$c_id){
	$where_sql.=" order by c_sort_id  LIMIT 1";
}else{
	$where_sql.= " and c_id = {$c_id}";
}
$sql = "select * from ".lc()."_products_type ".$where_sql;
$rs = mysql_query($sql);
if($rs){
	$rows = mysql_fetch_assoc($rs);
	$lanmu=$rows['lanmu'];
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $rows['c_title']?>-<?php echo top_keys(7)?></title>
<meta name="description" content="<?php echo top_keys(9)?>">
<meta name="keywords" content="<?php echo top_keys(8)?>">
<link href="<?php echo TPL_URL?>style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="body">
<?php require('head.php')?>
<div id="middle">
  <div id="left">
    <div id="type">
      <div class="title">
        <h1>栏目分类</h1>
      </div>
      <ul>
        <?php echo get_products_type_m_ul($pid,$tid,$lanmu) ?>
      </ul>
    </div>
    <!-- type --></div>
  <!-- left -->
  <div id="right">
    <div class="title">
      <h1><?php echo get_lanmu_name($lanmu)?></h1>
      <h3><a href="index.php">首页</a> > <?php echo get_lanmu_name($lanmu)?> > <?php echo $rows['c_title']?></h3>
    </div>
    <div id="pro_list">
      <ul>
        <?php echo show_products_more_ul(6,3,$c_id,$lanmu,25,0,0,$key,210,148)?>
      </ul>
      <div class="clear"></div>
    </div>
  </div>
  <!-- right -->
  <div class="clear"></div>
</div>
<?php require('bot.php') ?>
<br>
</body>
</html>
